package cn.nawang.ebeim.client.exception;

/**
 * @ClassName: RootException
 * @Description: 根异常
 * @author fanyb
 * @date Aug 20, 2015 4:33:13 PM
 * @version v1.0
 */
public class RootException extends Exception{
  private static final long serialVersionUID = 1L;
  private String errorMessage = null;

  public RootException(String errorMessage) {
      super(errorMessage);
      this.errorMessage = errorMessage;
  }

  public RootException(Throwable e) {
      super(e);
      if (e != null) {
          this.errorMessage = e.getMessage();
      } else {
          this.errorMessage = "未知异常";
      }
  }

  public RootException(String errorMessage, Throwable e) {
      super(errorMessage, e);
      this.errorMessage = errorMessage;
  }

  public String getErrorMessage() {
      return errorMessage;
  }
}
